package com.wzh.musichome.controller;


import com.wzh.musichome.common.ResponseTemplate;
import com.wzh.musichome.entity.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wzh
 * @since 2020-12-10
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/test")
    public Object test(User user,int start,int limit){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("user",user);
        map.put("start",start);
        map.put("limit",limit);

        ResponseTemplate.ResultData data = ResponseTemplate.getSuccessResponse();
        data.setMsg("ok");
        data.setData(map);
        return data;
    }
}
